/*
 * @Author: 何 海深 813936564@qq.com
 * @Date: 2023-11-30 15:49:42
 * @LastEditors: 何 海深 813936564@qq.com
 * @LastEditTime: 2024-03-27 11:12:35
 * @FilePath: \vue-project\src\router\index.ts
 * @Description: 路由
 */
import { createRouter, createWebHashHistory, type RouteRecordRaw } from 'vue-router'
// import HomeView from '../views/HomeView.vue'
const defaultRoute: RouteRecordRaw[] = [
  {
    name: 'error',
    path: '/error',
    component: () => import('@/views/error/errorIndex.vue')
  }
]
const routes: RouteRecordRaw[] = [
  ...defaultRoute,
  {
    path: '/', // 首页
    name: 'pageHome',
    component: () => import('@/views/pageHome/index.vue'),
    meta: {
      name: '首页'
    },
    redirect: '/cityOverview',
    children: [
      {
        path: '/cityOverview',
        name: 'cityOverview',
        component: () => import('@/views/cityOverview/index.vue'),
        meta: {
          title: '全市统览'
        }
      },
      {
        path: '/supervise',
        name: 'supervise',
        component: () => import('@/views/supervise/index.vue'),
        meta: {
          title: '督办事项'
        }
      },
      {
        path: '/cityFixedAssetsList1View',
        name: 'cityFixedAssetsList1View',
        component: () => import('@/views/cityFixedAssetsList1View/index.vue'),
        meta: {
          title: '全市固定资产'
        }
      },
      {
        path: '/cityFixedAssetsList2View',
        name: 'cityFixedAssetsList2View',
        component: () => import('@/views/cityFixedAssetsList2View/index.vue'),
        meta: {
          title: '全市固定资产2'
        }
      },
      {
        path: '/realEstateView',
        name: 'realEstateView',
        component: () => import('@/views/realEstateView/index.vue'),
        meta: {
          title: '房地产投资'
        }
      },
      {
        path: '/investmentSubjectOne',
        name: 'investmentSubjectOne',
        component: () => import('@/views/investmentSubjectOne/index.vue'),
        meta: {
          title: '项目概览-单个项目'
        }
      },
      {
        path: '/gongCom',
        name: 'gongCom',
        component: () => import('@/views/gongCom/index.vue'),
        meta: {
          title: '四大领域-工业投资'
        }
      }
    ]
  }
  /* {
    path: '/', // 风险一张图
    name: 'risk',
    component: () => import('@/views/risk/index.vue'),
    meta: {
      name: '风险一张图'
    }
  },
  */
]
const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
